package com.lc.user.express.httpserver;

import com.zcx.helper.http.AsyCallBack;
import com.zcx.helper.http.note.HttpInlet;

import org.json.JSONObject;

/**
 * Created by Administrator on 2016/4/12.司机已接单
 */
@HttpInlet(Net.GET_ORDER_CHOOSED)
public class GetOrderChoosed extends ZJDBAsyGet<GetOrderChoosed.Info> {
    public String orderid,userid;

    public GetOrderChoosed(String orderid,String userid, AsyCallBack listener) {
        super(listener);
        this.orderid = orderid;
        this.userid = userid;
    }

    @Override
    protected Info parser(JSONObject object) {
        if (object.optInt("message") == 1) {
            Info info = new Info();
            info.avatar = Net.SERVER + object.optString("avatar");
            info.name = object.optString("name");
            info.mobile = object.optString("mobile");
            info.license = object.optString("license");
            info.star = object.optDouble("star");
            info.point = object.optString("point");
            info.number = object.optString("number");
            info.city = object.optString("city");
            return info;
        } else {

        }
        return null;
    }

    public static class Info {
        public String avatar,name,number,point,license,mobile,city;
        public double star;
    }
}
